package com.yc.springboot;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;


//@Filter(type = FilterType.CUSTOM, classes = TypeExcludeFilter.class)
//type = FilterType.CUSTOM  自定义过滤
// 这个过滤器会排除某些类型的组件或配置类，以防止它们被 Spring 的扫描机制加载到上下文中


//type = FilterType.CUSTOM, classes = AutoConfigurationExcludeFilter.class)
//主要功能是排除某些自动配置类，防止它们被 Spring Boot 的自动配置机制加载

//扫描启动类所在包及子类
@SpringBootApplication
//必须只能 mapper 所在的包
@MapperScan("com.yc.springboot.mapper")
public class Application {

    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }

    //配置服务器端点
    @Bean
    public ServerEndpointExporter serverEndpointExporter(){
        return new ServerEndpointExporter();
    }

}
